package xps.and.uudaijia.userclient.view.custom;

import android.content.Context;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.AttributeSet;

import xps.and.uudaijia.userclient.R;


public class CommonSwipeRefreshLayout extends SwipeRefreshLayout {

    public CommonSwipeRefreshLayout(Context context) {
        super(context);
        init();
    }

    public CommonSwipeRefreshLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    private void init() {
        /**
         * 下拉刷新控件设置
         */
//        this.setProgressBackgroundColorSchemeResource(android.R.color.white);
//        this.setColorSchemeResources(android.R.color.background_dark);
        this.setColorSchemeResources(R.color.colorPrimary);
//        this.setColorSchemeResources(android.R.color.background_dark,
//                android.R.color.holo_red_light, android.R.color.holo_orange_light,
//                android.R.color.holo_green_light);
//        this.setProgressViewOffset(false, 0, (int) TypedValue
//                .applyDimension(TypedValue.COMPLEX_UNIT_DIP, 24, getResources()
//                        .getDisplayMetrics()));
    }

}
